<extend name="Public/base"/>
<block name="style">
<style>
    #main-content {
        background: none;
    }
    .index-block-box {
        padding:15px;
    }
</style>
</block>
<block name="script">
    <script type="text/javascript" src="__JS__/highcharts.js"></script>
</block>
<block name="body">
    <div class="index-content">
    <div class="index-content-box">
        <div class="with-padding-lg">
            <div class="count clearfix">
                <div class="col-xs-3 text-center">
                    <a href="{:U('action/actionlog')}" class="with-padding-lg bg-special index-block-box">
                        <i class="icon-tasks"></i>
                        {$count.today_action_log}
                        <br/>
                        {:L('_USER_ACTION_TODAY_')}
                    </a>
                </div>
                <div class="col-xs-3 text-center">
                    <a class="with-padding-lg bg-info index-block-box" href="{:U('user/index')}">
                        <i class="icon-user"></i>
                        {$count.today_user} 
                        <br/>
                        {:L('_USER_INCREASE_TODAY_')}</a>
                </div>
                <div class="col-xs-3 text-center">
                    <a class="with-padding-lg bg-danger index-block-box" href="{:U('user/index')}">
                        <i class="icon-group">
                        </i>
                        {$count.total_user}
                        <br/>
                        {:L('_USER_COUNT_')}
                    </a>
                </div>
                <div class="col-xs-3 text-center">
                    <a class="with-padding-lg bg-success index-block-box"  href="{:U('count/nowuserlist')}">
                        <i class="icon-group">
                        </i>
                        {$count.now_inline}
                        <br/>
                        {:L('_USER_ONLINE_')}
                    </a>
                </div>
            </div>
        </div>


    </div>
    <div class="index-content-box">

        <div class="with-padding-lg">
            <div class="count clearfix">
                <include file="_count_file"/>
                <div class="col-xs-6 text-center">
                    <a class="with-padding-lg bg-info index-block-box" target="_blank" href="http://www.muucmf.cn/muucmf/index/document.html">
                        <i class="icon-book"></i> {:L('_DOCUMENT_CENTER_')}</a>
                </div>
                <div class="col-xs-6 text-center">
                    <a class="with-padding-lg bg-warning index-block-box" target="_blank" href="http://www.muucmf.cn/forum">
                        <i class="icon-chrome"></i> {:L('_OFFICIAL_GROUP_')}
                    </a>
                </div>
            </div>
        </div>
        <div class="with-padding-lg">
            <div class="col-xs-12">
                <div class="hd cf">
                    <h5>{$addons_config.title}</h5>
                    <div class="title-opt"></div>
                </div>
                <div class="bd">
                <div class="count_common_box">
                    <div class="portlet-title">
                        <div class="caption text-center">
                            <span class="caption-subject">系统信息</span>
                        </div>
                    </div>
                    <div class="portlet-body">
                        <table class="table table-bordered table-striped ">
                            <tr>
                                <th style="width: 200px">{:L('_SERVER_OS_')}</th>
                                <td>{$Think.const.PHP_OS}</td>
                            </tr>
                            <tr>
                                <th>{:L('_THINKPHP_VERSION_')}</th>
                                <td>{$Think.VERSION}</td>
                            </tr>
                            <tr>
                                <th>{:L('_RUNTIME_ENVIR_')}</th>
                                <td>{$_SERVER['SERVER_SOFTWARE']}</td>
                            </tr>
                            <tr>
                                <th>{:L('_MYSQL_VERSION_')}</th>
                                <php>
                                    $system_info_mysql = M()->query("select version() as v;");
                                </php>
                                <td>{$system_info_mysql.0.v}</td>
                            </tr>
                            <tr>
                                <th>{:L('_LIMIT_UPLOAD_')}</th>
                                <td>{:ini_get('upload_max_filesize')}

                                   {:L('_MODIFY_HOW_TO_')}</td>
                            </tr>
                            <tr>
                                <th>{:L('_MUUCMF_VERSION_')}</th>
                                <td>{:file_get_contents('./Data/version.ini')}</td>
                            </tr>
                        </table>
                    </div>
                </div>
                </div>
            </div>

        </div>
    </div>
</div>

    <div class="clearfix">
        <div class="col-xs-4">

        </div>
        <div class="col-xs-4">

        </div>
        <div class="col-xs-4">

        </div>

    </div>
    <script>
        $('#main-content').css('left', 0);
        $(function () {
            $('#myChart').highcharts({
                chart: {
                    type: "spline",
                    style: {
                        fontFamily: '"Microsoft Yahei", "宋体"'
                    }
                },
                title: {
                    text: "{:L('_USER_INCREASE_RECENT_',array('count_day'=>$count['count_day']))}",
                    x: -20 //center
                },
                xAxis: {
                    categories: eval('{$count.last_day.days}'),
                    title: {
                        text: "{:L('_MEMBER_REG_TODAY_')}",
                        enabled: false
                    }
                },
                yAxis: {
                    title: ''
                },
                legend: {
                    layout: 'vertical',
                    verticalAlign: 'middle',
                    borderWidth: 0,
                    enabled: false
                },
                series: [{
                    name: "{:L('_MEMBER_REG_TODAY_')}",
                    data: eval('{$count.last_day.data}'),
                    enable: true
                }], credits: {enabled: false}
            });
        });


    </script>

</block>
<block name="modal">
    <div class="modal fade" id="settingCount">
        <div class="modal-dialog modal-sm">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span
                            class="sr-only">{:L('_CLOSE_')}</span></button>
                    <h4 class="modal-title">{:L('_STATISTICS_SET_')}</h4>
                </div>
                <div class="modal-body">
                    <div class="with-padding">
                        <label>{:L('_DISPLAY_DAYS_DEFAULT_')} </label><input class="form-control" name="count_day" value="{$count.count_day}">

                    </div>


                </div>
                <div class="modal-footer">
                    <button class="btn " data-role="saveCountSetting">
                        <i class="icon-ok"></i> {:L('_SAVE_')}
                    </button>
                    <button class="btn " data-dismiss="modal">
                        <i class="icon-remove"></i> {:L('_CANCEL_')}
                    </button>
                </div>
            </div>
        </div>
    </div>
    <script>
        $('[data-role=saveCountSetting]').click(function () {
            $.post("__SELF__", {count_day: $('[name=count_day]').val()}, function (msg) {
                handleAjax(msg);
            });
        })
    </script>
</block>